/**包相关 */
PACKAGE = {};
PACKAGE.STATUS = {
	DESIGNING : 1,					//设计中
	EFFECTIVE : 2,              //已生效
	DISABLE : 3,               //已失效
	STOP : 4,                  //已停用
	APPROVALING : 5,           //审批中
	APPROVALPASS : 6,          //审批通过
	APPROVALNOPASS : 7,        //审批不通过
	APPROVALEXCEPTION : 8      //审批异常
};
PACKAGE.OPERATE = {
	NEW : 1,		//新增
	MODIFY : 2,		//修改
	SHOW : 3,		//查看
	PUBLISH : 4,	//发布
	ENABLE : 5,		//启用
	STOP : 6,	//停用
	IVALID : 7,		//作废
	COPYNEW : 8		//复制新建
};
//修改时，包内容操作
PACKAGE.CONTENTOPERATE = {
	ADD : 1,		//新增
	MODIFY : 2,		//修改
	DEL : 3		//删除
};

PACKAGE.PARAMETERTYPE = {
	S00 : "离散值类型（多选一）",
	S01 : "产品新装已有类型，可选Y|N|D",
	S02 : "多选多离散值（N选M）",
	S03 : "设置预后标识",
	P00 : "设置产品属性（其值与原离散表对应）",
	contentParam : ['P01','P02','P03','P04','P05'],
	key : {
		P00 : 'P00',
		S00 : 'S00',
		S02 : 'S02'
	}
};

/**对象相关 */
OBJECT = {
	PARTY :"-1",
	CDMA  :"379"
};
OBJECT.Mark = {
	Intention : 'Y',//客户订购对象标示位
}
OBJECT.OBJTYPE = {
	PROD_SPEC : "2",
	OFFER_SPEC : "7",
	PARTY : "1",
	LABEL : "24"
}
OBJECT.OBJACTION = {
		Y : "Y",  //新装
		N : "N",  //已有
		D : "D"  //不需要
}
OBJECT.PartObjMap = function() {
	var objMap = new HashMap();
	objMap.put("-1","客户");
	objMap.put("379","CDMA");
	objMap.put("9","宽带");
	objMap.put("2","固话");
	objMap.put("881","iTV");
	return objMap;
}

/**动作相关 */
ACTION = {};
ACTION.TYPE = {
	NEW : "1", //: "新装",
	D : "100", //: "订购",
	J : "101", //: "加入",
	SP: "201", //: "设置产品属性",
	KS: "202" //: "开服务"
}
ACTION.TYPEMAP = function() {
	var objMap = new HashMap();
	objMap.put("100","订购");
	objMap.put("101","加入");
	objMap.put("1","新装");
	//objMap.put("201","设置产品属性");
	//objMap.put("202","开服务");
	return objMap;
}
ACTION.FEE_TYPE = {
	1 : "后付",
	2 : "预付"
}
ACTION.PROD_ACTION_TYPE = {
	Y : "新装",
	N : "已有",
	D : "不需要"
}
ACTION.RELA_TYPE = {
	Y : "必选",
	C : "可选"
}

/**校验相关 */
VALIDATE = {};
VALIDATE.TYPE ={
	SAVE :　"0",
	QUERY :　"1"
}

/** 参数相关**/
params = {};
params.S03 = {
	1 : '预付',
	2 : '后付',
    type : 'S03'
}
params.S01 = {
	Y : '新装',
	N : '已有',
	D : '不需要',
	type : 'S01'
}

CONSTANT = {
	packBaseInfoAttr  : ['packageId'
				,'name'
				,'packageCode'
				,'description'
				,'receiptContent'
				,'packagePicUrl'
				,'packageAD'
				,'areaId'
				,'startDate'
				,'endDate'
				,'statusCd'
				,'createDate'
				,'version'
				,'feeType'],
	packObjAttr : ['packageId'
				,'objectNumber'
				,'objectName'
				,'objType'
				,'objId'
				,'isNew'
				,'createDate'
				,'version'
				,'seq'
				,'alias',
				'defaultValue'],
	packAndItemParemter : ['packageId'
				,'parameterId'
				,'actionItemId'
				,'name'
				,'parameterType'
				,'itemSpecId'
				,'defaultValue'
				,'valueDownlimit'
				,'valueUplimit'
				,'optionValue'
				,'createDate'
				,'version'
				,'packageParameterId'],
	packActionItemAttr : ['actionItemId'
				,'description'
				,'partobjNumber'
				,'actionTypeCd'
				,'effectobjNumber'
				,'roleCd'
				,'roleName'
				,'isVisible'
				,'isMust'
				,'createDate'
				,'version'
				,'packageId'
				,'seqNumber'],
	paramActionRelaAttr : ['parameterId'
				,'value'
				,'actionItemId'
				,'relaType'
				,'grpId']
}

AREA = {};
AREA.ThirdLevel = function(){
	var map = new HashMap();
	map.put('025', {areaId:'3', areaName:'南京'});
	map.put('0511',{areaId:'4', areaName:'镇江'});
	map.put('0510',{areaId:'15',areaName:'无锡'});
	map.put('0512',{areaId:'20',areaName:'苏州'});
	map.put('0513',{areaId:'26',areaName:'南通'});
	map.put('0514',{areaId:'33',areaName:'扬州'});
	map.put('0515',{areaId:'39',areaName:'盐城'});
	map.put('0516',{areaId:'48',areaName:'徐州'});
	map.put('0517',{areaId:'60',areaName:'淮安'});
	map.put('0518',{areaId:'63',areaName:'连云港'});
	map.put('0519',{areaId:'69',areaName:'常州'});
	map.put('0523',{areaId:'79',areaName:'泰州'});
	map.put('0527',{areaId:'84',areaName:'宿迁'});
	return map;

}

TIPS = {
	validating : '校验中',
	saving : '保存中',
	stoping : '停用中',
	starting : '启用中',
	publishing : '发布中',

};

MAXTYPE = {
	partObj : 1,
	actionItem : 2,
}
var ACTIVITY_APPROVAL_PASS = 6;
var ACTIVITY_EFFECTIVE = 2;

var ACTIVITY_DISABLE = 4;

var ACTIVITY_DESINING = 1;
